package com.tom.demo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;

@Data
@ApiModel(value = "添加/修改角色信息")
public class RoleEditDto {

    @ApiModelProperty("角色id")
    @NotBlank(groups = {Update.class}, message = "角色id不能为空")
    private String roleId;

    @ApiModelProperty("角色名称")
    @NotBlank(groups = {Update.class,Insert.class},message="[角色名称]不能为空")
    private String roleName;

    @NotBlank(groups = {Update.class,Insert.class},message="[角色权限]不能为空")
    @ApiModelProperty("角色权限")
    private String roleKey;

    @NotNull(groups = {Update.class,Insert.class},message="显示顺序不能为空")
    @ApiModelProperty("用户昵称")
    private Integer roleSort;


    @ApiModelProperty("备注")
    private String remark;

    public interface Insert extends Default { }
    public interface Update extends Default { }
}
